home
***
CD-ROM
|
disk
|
other
***
search
/
SGI Hot Mix 8
/
Hot Mix 8.iso
/
.all
/
bin
/
INSTALL_REMOVE.csh
(
.txt
)
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1994-06-22
|
3KB
|
124 lines
#!/bin/csh
#
###############################################################################
#
# Copyright (c) 1994 Silicon Graphics
# All Rights Reserved
#
# Version: 1.0
#
# Date: Fri Apr 22 20:01:50 PDT 1994
#
# Author: Joe Ushana and Craig McFarland
#
# Purpose: To install and remove software from Hot Mix CD
#
# Check for writeability to drive
# Check for enough disk space on target drive
# Check for existence of Software on target drive
# by checking for existence of
# /usr/tmp/PRODUCTNAME_temp file,
# "versions -s $PRODUCTNAME*", etc.
# Check for
# Check for
# Check for
# Incrementally write to a temp file the status of install
# remove so that it can be completed if interrupted
#
################################################################################
#
#
limit coredumpsize 0
alias cd cd
if ($#argv < 1) then
echo
echo "C-shell script used to install and remove "
echo "software from the Silicon Graphics Hot Mix CD HotMix8"
echo
echo 'example: ./INSTALL_REMOVE.csh YourSoftwareName` '
echo
endif
setenv PRODUCTNAME $argv[1]
setenv INST_DIR /usr/tmp/$PRODUCTNAME
setenv KBYTES_REQ $argv[2]
setenv PRODUCTDIR $HOTMIXDIR/products/$PRODUCTNAME
cd $PRODUCTDIR
setenv USERID `id | cut -d'(' -f2 | cut -d')' -f1`
setenv GROUPID `id | cut -d'(' -f3 | cut -d')' -f1`
echo "****************************"
echo "PRODUCTNAME=$PRODUCTNAME"
echo "PRODUCTDIR=$PRODUCTDIR"
echo " INST_DIR=$INST_DIR"
echo " KBYTES_REQ=$KBYTES_REQ"
echo " USERID=$USERID"
echo " GROUPID=$GROUPID"
echo "****************************"
echo
#
#
################################################################################
#
#
#
ASK:
echo
echo "Please select one of the following:"
echo
echo " 1) Install $PRODUCTNAME"
echo " 2) Remove $PRODUCTNAME"
echo
echo " Q) Quit"
echo
echo -n "Enter choice: "
set A = $<
switch ($A)
case 1:
goto INSTALLIT
breaksw
case 2:
goto REMOVEIT
breaksw
case [Qq]:
echo
echo "*** Quit ***"
echo
exit 0
default:
echo
echo "You must choose 1, 2, or Q. Try again."
goto ASK
endsw
#**********
INSTALLIT:
#**********
#
echo
echo "Running InstallIt"
echo
#
cd $HOTMIXDIR/products/$PRODUCTNAME
# cd $PRODUCTDIR
./InstallIt
goto ASK
#**********
REMOVEIT:
#**********
#
echo
echo "Running Removet2"
echo
#
# cd $HOTMIXDIR/products/$PRODUCTNAME
./RemoveIt
goto ASK